
import React from "react";
import cookie from "react-cookie";

class merchantPay extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            shopNo: 0,
            shopName: "",
            amount: ''
        }
    }

    componentWillMount() {
        document.title = "叮叮收钱";
    }

    componentDidMount() {
        document.body.className="pay-merchant-body";
        const query = this.props.location.query;
        if(query.amount) {
            this.setState({
                amount: query.amount,
                shopNo: query.shopNo,
                shopName: query.shopName
            })
        }
    }

    componentWillUnmount() {
        document.body.className="common-body";
    }

    render() {
        return (
            <div>
                <div style={{padding:'0 26px'}}>
                    <div style={{background: '#ffffff', paddingBottom: '20px'}}>
                        <div className="pay-merchant-title">
                            <img src="http://oeb6w1s1c.bkt.clouddn.com/pay_success_02.png"/>
                            <div className="pay-status-div">支付成功</div>
                            <div className="pay-success-tips">感谢使用叮叮收钱</div>
                        </div>
                        <div>
                            <hr style={{borderTop:'1px'}}/>
                            <div className="pay-merchant-amount"><div>¥{this.state.amount}</div></div>
                            <div className="pay-merchant-shop"><div>{this.state.shopName}</div></div>
                        </div>
                    </div>
                </div>

                <div className="pay-merchant-bottom">由驿速网络提供技术服务</div>
            </div>
        )
    }
}

export default merchantPay;